<?php $header=$this->action('ZfcAdmin\Controller\AdminController', 'headerAction');
	  $baseUrl = $header->headerarray['baseUrl'];
?>
<?php if(isset($_SESSION['admin'])){?>
<html>
	<center>
		<head>
			<?php if(isset($_GET['period_pakage_id']) && $_GET['period_pakage_id']!=""){?>
			<h1>Edit Period Package</h1>
			<?}else{?>
			<h1>Add Period Package</h1>
			<?}?>
		</head><br/>
		<body>
			<form id="add_period_form" name="add_period_form" method="post" action="">
				Period of package: <input type="text" name="period_name" value="<? if(isset($this->package_period_details->period_name) && $this->package_period_details->period_name!=""){echo $this->package_period_details->period_name;}else{}?>" id="period_name" placeholder="Please enter period of package name"><br/><br/>
				Period of package Amount: <input type="text" name="period_amount" value="<? if(isset($this->package_period_details->time_period_amount) && $this->package_period_details->time_period_amount!=""){echo $this->package_period_details->time_period_amount;}else{}?>" id="period_amount" placeholder="Please enter period of package amount"><br/><br/>
				<a href="<? echo $baseUrl.'admin/period-packages'?>">Back</a>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" id="btn_period" name="btn_period" value="Save" onClick="return add_period_package();">
				<input type="hidden" id="hid_period" name="hid_period" value="<? if(isset($this->package_period_details->period_pakage_id) && $this->package_period_details->period_pakage_id!=""){echo $this->package_period_details->period_pakage_id;}else{}?>">
			</form>
		</body>
	</center>
</html>
<? } else {?>
<script>
	window.location=ADMIN_BASE_URL+'admin';
</script>
<?}?>